<style>
    body {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 13px;
        background-color: white;
        color: black;
    }
.order_table { width:650px;; margin:0px; overflow:hidden; page-break-after: always;}
.order_table table th { font-size:13px; border-bottom:2px #000 solid; height:35px; }
/*.order_table table td { border-bottom:1px #000 dashed;}*/
.order_table table td .num { text-align:center; }
.order_table tfoot td { border:0px;}
.ptd td { font-size:13px; line-height: 1.5em;}
.ptd ,.nob {width:650px;}
.nob ,.nob td {border:0px;}
</style>
<volist name="ases" id="o">
<div class="order_table">
<table width="650" border="0" cellspacing="0" cellpadding="0" class="nob" style="border-bottom: 2px #aaa solid;">
  <tr>
  	<td width="200"><empty name="noprint"><div style=" padding-left: 10px;width:180px; height:40px; overflow:hidden;"><img width="130" src="/Public/image/logo200.jpg" /></div></empty></td>
    <td align="right" valign="bottom"><em>订单号：{$o['sn']}<br /><span style="color: #666;font-size: 12px;">下单时间：{$o['add_time']|date='Y-m-d H:i:s',###}</span></em></td>
  </tr>
</table>
<div style="line-height:1.5em; float: left; width: 200px; font-size: 12px; padding: 10px 0 10px 20px;">
    <strong>收货地址：</strong><br />{$Area[$o['address']['province']]['name']}{$Area[$o['address']['city']]['name']}{$Area[$o['address']['district']]['name']}{$o.address.address}
</div>
<div style="line-height:1.5em; float: right; width: 250px; font-size: 12px; padding: 10px 0 10px 0;">
    <strong>{$o.address.consignee}</strong><br />
    电话：{$o.address.tel}<br />
    手机：{$o.address.mobile}<br />
</div>
<div style="clear: both;"></div>
<div style="line-height:1.5em; float: left; width: 200px; font-size: 12px; padding: 10px 0 10px 20px;">
    <strong>订单留言：</strong><br />{$o['ext']['beizhu']['value']}
<br/>

订单号：{if $o['ids']}{$o['ids']}{else}{$o['id']}{/if}
<br/>
						  <php>
						 if($o['ids']){
						  	$arrids = explode(',', $o['ids']);
								foreach($arrids as $id){
									if($coupon[$id]['free'] == 1){
										echo '免邮&nbsp;&nbsp;&nbsp;';
										break;
									}
								
								}
						  
						  }else{
						  	if($coupon[$o['id']]['free']==1){
							echo '免邮&nbsp;&nbsp;&nbsp;';
							}
						  }
						  
						  </php>
{if $o['ext']['pid']['value'] > 0}
父拆单号：{$o['ext']['pid']['value']}
{/if}						  

</div>

<div style="clear: both;"></div>
<table border="0" cellpadding="2" cellspacing="0" class="ptd">
    <thead>
    <tr valign="bottom">
    <th>商品名称</th>
    <th>商品编号</th>
    <th>数量</th>
    <th>单价</th>
    <th>BV</th>
    <th>金额</th>
  </tr>
  </thead>
  
  <tbody>
  	<php>$prototalnum = 0;</php>
	<volist name="o.goods" id="vo">
	
	<php>$prototalnum += $vo['number'];</php>
  <tr valign="bottom">
    <td>({$vo['product_id']}){if $coupon[$o['id']][$vo['product_id']]['USE'] == 1}[老郭]{/if}{$vo['product_name']}</td>
    <td align="center">{$vo['product_psn']}</td>
     <td align="center">{$vo['number']}</td>
    <td align="center">{$vo['price']/100}</td>
   <td align="center">
   {if $coupondata[$o['id']]}
   <php>$tre =true;</php>
   	<volist name="coupondata[$o['id']]" id="c">
               	{if $c['goods_id']==$vo['product_id'] && $c['subject']=='BV'}{$c['value']/100}<php>$tre=false;</php>{/if}
     </volist>
     {if $tre}0{/if}
     {else}
     0
     {/if}
   	</td>
    <td align="center"><span class="count_price" id="count_price_{$vo['id']}">{$vo['priceall']/100}</span></td>
  </tr>
  
	</volist>
	<!-- <PHP>$acv=0;</PHP> -->
	<!--
	<volist name="o.finance" id="scv">
	{if $scv['action']=='OOS' || $scv['REFUND']=='REFUND'}
  <tr>
	<PHP>
			$acv+=$scv['value']*$scv['number'];
	</PHP>
	<td align="center">{$scv['remark']}</td>
	<td align="center"></td>
	<td align="center">{$scv['number']}</td>
	<td align="center">{$scv['value']/100}</td>
	<td></td>
	<td align="center">{$scv['value'] * $scv['number']/100}</td>
  </tr>
  {/if}
	</volist> 
	-->
	<tr>
		<td colspan="6" align="right">
	<volist name="coupondata[$o['id']]" id="c">
	<php>$lg=0;</php>
				{if $c['type']=='USE'}
				<php>$lg+=$c['value']/100;</php>
				{else}
               	{$c['content']}: {$c['value']/100}{$c['subject']}<br/>
               	{/if}
     </volist>
     {if $lg > 0}
    	 老郭优惠: {$lg}CV
    	 {/if}
     </td>
	</tr>
    </tbody>
    <tfoot>
   <tr>
  	<td colspan="2">&nbsp;</td>
  	<td colspan="2" style="border-top: ">产品总数：</td>
  	<td colspan="2" style="border-top:">{$prototalnum}</td>
  </tr> 
  <tr>
  	<td colspan="2">&nbsp;</td>
  	<td colspan="2" style="border-top: 1px #000 solid;">合计(￥)：</td>
  	<td colspan="2" style="border-top: 1px #000 solid;">{$o['amount']/100}</td>
  </tr> 
  
  </tfoot>
</table>
<empty name="noprint">
<p style="border-top: 2px #aaa solid; text-align: center; color: #666;">{$o['order']['sn']}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;联酷网络科技有限公司&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;电话：400-833-3818&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;网址：www.smw01.com</p>
<else />
<table>
    <tr><td>&nbsp;</td></tr>
    <tr><td>&nbsp;</td></tr>
    <tr><td>&nbsp;</td></tr>
</table>
</empty>
</div>
</volist>
<empty name="noprint">
<script type="text/javascript">
        window.focus();
        window.print();
</script>
</empty>